CREATE PROCEDURE dbo.LeadUpdateModel
	@LeadKey INT,
	@Title NVARCHAR(127),
	@OwnerKey INT,
	@LeadTypeKey INT,
	@LeadStatusKey INT,
	@Audit_UserKey INT
AS
	SET NOCOUNT ON

	UPDATE dbo.Lead SET
		Title = @Title,
		OwnerKey = @OwnerKey,
		UpdatedByKey = @Audit_UserKey,
		UpdatedDate = GetDate(),
		LeadTypeKey = @LeadTypeKey,
		LeadStatusKey = @LeadStatusKey
	WHERE LeadKey = @LeadKey


	EXEC dbo.LeadSelectModel @LeadKey = @LeadKey, @Audit_UserKey = @Audit_UserKey

RETURN 0
